package com.example.myvertx.config;

import com.google.auto.service.AutoService;
import io.vertx.core.json.jackson.DatabindCodec;
import io.vertx.core.spi.JsonFactory;
import io.vertx.core.spi.json.JsonCodec;

@AutoService(JsonFactory.class)
public class CustomerJsonFactory implements JsonFactory {
  @Override
  public JsonCodec codec() {
    DatabindCodec databindCodec = new DatabindCodec();
    DatabindCodec.mapper().registerModule(new LongToStrModule());
    return databindCodec;
  }
}
